#include<stdio.h>
float result;
float AreaOfSquare(int a)
{
    result = a*a;
    return result;
}

float AreaOfRectangle(int a, int b)
{
    result = a*b;
    return result;
}

float AreaOfRightTriangle(int a, int b)
{
    result = a*b/2;
    return result;
}

float AreaOfCircle(int radius)
{
    result = radius*radius*3,141592;
    return result;
}

int main()
{
    int f;
    float x,y,radius;
    float area;
    scanf("%d", &f);
    switch(f)
    {
        case 1:
            scanf("%f", &x);
            area = AreaOfSquare(x);
            printf("%f", area);
            break;

        case 2:
            scanf("%f %f", &x, &y);
            area = AreaOfRectangle(x,y);
            printf("%f", area);
            break;

        case 3:
            scanf("%f %f", &x, &y);
            area = AreaOfRightTriangle(x,y);
            printf("%f", area);
            break;

        case 4:
            scanf("%f", &radius);
            area = AreaOfCircle(radius);
            printf("%f", area);
            break;
    }
    return 0;
}
